<template>
    <div>
        <van-nav-bar title="安全中心" left-text="返回" left-arrow @click-left="back" />
    </div>
    <!-- 背景 -->
    <div class="bg"></div>

    <div class="info">
        <div class="list">
                <div class="name1">修改密码
                    <van-icon name="arrow" style="margin-left: 260px;" />
                </div>
                <div class="name2">注销账号
                    <van-icon name="arrow" style="margin-left: 260px;" />
                </div>
        </div>

    </div>
    <div class="settlement">
        <van-button block round @click="box">退出登录</van-button>
    </div>
</template>
<script>
import { useRouter } from 'vue-router'
import { get } from "../request";
import { ref } from "vue";
export default {
    setup() {


        
        // //const addlist = ref([])
        // const updatePassword = async () => {
        //     const res = await get("/updatePassword", {
        //         params: {
        //             password ,
        //             oldPassword, 
        //             tokenString: JSON.parse(localStorage.getItem('tokens'))
        //         }
        //     })
        //     //addlist.value = res.data.result
        //     console.log("地址信息", res);
        // }
        // updatePassword()

        const router = useRouter();
        const back = () => {
            router.go(-1);
        }

        return {
            back,
            //updatePassword
        }
    },

}
</script>
<style lang="less" scoped>
.name1 {
    padding: 5px;
    line-height: 40px;
    margin-left: 10px;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e8e8e8;
    font-size: 14px;
}
.name2{
    padding: 5px;
    line-height: 40px;
    margin-left: 10px;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}
.settlement {
    position: absolute;
    bottom: 10px;
    width: 90%;
    margin-left: 15px;
    top: 350px;
}

.settlement .van-button--default {
    color: #fff;
    background: linear-gradient(to right, #404dd9, #182078);
    border: none;

}

.info {
    border-radius: 5px;
    position: relative;
    top: -30px;
    left: 0;
    width: 95%;
    margin: 0 auto;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, );
}

.bg {
    height: 100px;
    background-color: #ff8c8c;
}
</style>